package com.z.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.z.admin.entity.Permission;
import com.z.admin.vo.DTree;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author z
 * @since 2022-02-14
 */
public interface IPermissionService extends IService<Permission> {
    /**
     * 获取权限菜单树
     * @return List<DTree>
     */
    List<DTree> selectTree();

    /**
     * 根据userId获取权限菜单
     * @param userId
     * @return List<Permission>
     */
    List<DTree> getMenu(String userId);

    /**
     * 根据角色生成带勾选的树
     * @param roleId
     * @return
     */
    List<DTree> getTree(String roleId);

}
